stack: Static analysis fixes
authorMatthias Clasen <mclasen@redhat.com>
Mon, 3 May 2021 11:35:21 +0000 (07:35 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 3 May 2021 11:44:38 +0000 (07:44 -0400)
gtk/gtkstack.c

index 4c7274d336fa73f919b04ae8cf41fc90d1473882..896a0b63de5cf2267b973914ce2b840556d28cea 100644 (file)
@@ -2320,7 +2320,7 @@ gtk_stack_snapshot_cube (GtkWidget   *widget,
 
   if (priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT)
     gtk_widget_snapshot_child (widget, priv->visible_child->widget, snapshot);
-  else
+  else if (priv->last_visible_child)
     gtk_widget_snapshot_child (widget, priv->last_visible_child->widget, snapshot);
   gtk_snapshot_restore (snapshot);